package homework.work3.model;

public class Product {
    private int id;
    private String name;
    private double price;
    private String brand;
    private int flog=0;

    //打印
    public void printProductInfo(){
        System.out.println("商品编号: " + id + " 商品名称: " + name
                + " 商品价格: " + price + " 商品品牌: " + brand);
    }

    //构造器

    public Product() {
    }
    public Product(int id, String name, double price, String brand) {
        this.id = id;
        this.name = name;
        this.price = price;
        this.brand = brand;
    }

    //get and set
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public int getFlog() {
        return flog;
    }

    public void setFlog(int flog) {
        this.flog = flog;
    }
}
